package com.wdz.article.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 文章列表
 * </p>
 *
 * @author 吴传逞
 * @since 2020-11-04
 */
@TableName("article")
public class Article extends Model<Article> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String id;
    /**
     * 文章标题
     */
    private String title;
    /**
     * 文章地址
     */
    @TableField("txt_url")
    private String txtUrl;
    /**
     * 收藏数
     */
    private Integer collections;
    /**
     * 评论数
     */
    private Integer comments;
    /**
     * 点赞数
     */
    private Integer praise;
    /**
     * 阅读数
     */
    private Integer count;

    public String getAbstract1() {
        return abstract1;
    }

    public void setAbstract1(String abstract1) {
        this.abstract1 = abstract1;
    }

    /**
     * 摘要
     */
    private String abstract1;
    /**
     * 所属分类id
     */
    @TableField("parent_category_id")
    private String parentCategoryId;
    /**
     * 所属分类名
     */
    @TableField("parent_category_name")
    private String parentCategoryName;
    /**
     * 创建时间
     */
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    private String createDate;
    /**
     * 修改时间
     */
    @TableField(value = "update_date", fill = FieldFill.INSERT_UPDATE)
    private String updateDate;
    /**
     * 是否置顶？0：否，1：是
     */
    @TableField("is_topping")
    private Integer isTopping;
    /**
     * 是否原创？0：否，1：是
     */
    @TableField("is_original")
    private Integer isOriginal;
    /**
     * 文章封面图片地址
     */
    private String image;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * 类型：0-文章，1-草稿
     */
    private Integer type;
    /**
     * 关联分类id数组
     */
    @TableField("relation_category_ids")
    private String relationCategoryIds;




    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTxtUrl() {
        return txtUrl;
    }

    public void setTxtUrl(String txtUrl) {
        this.txtUrl = txtUrl;
    }

    public Integer getCollections() {
        return collections;
    }

    public void setCollections(Integer collections) {
        this.collections = collections;
    }

    public Integer getComments() {
        return comments;
    }

    public void setComments(Integer comments) {
        this.comments = comments;
    }

    public Integer getPraise() {
        return praise;
    }

    public void setPraise(Integer praise) {
        this.praise = praise;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public String getParentCategoryId() {
        return parentCategoryId;
    }

    public void setParentCategoryId(String parentCategoryId) {
        this.parentCategoryId = parentCategoryId;
    }

    public String getParentCategoryName() {
        return parentCategoryName;
    }

    public void setParentCategoryName(String parentCategoryName) {
        this.parentCategoryName = parentCategoryName;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(String updateDate) {
        this.updateDate = updateDate;
    }

    public Integer getIsTopping() {
        return isTopping;
    }

    public void setIsTopping(Integer isTopping) {
        this.isTopping = isTopping;
    }

    public Integer getIsOriginal() {
        return isOriginal;
    }

    public void setIsOriginal(Integer isOriginal) {
        this.isOriginal = isOriginal;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getRelationCategoryIds() {
        return relationCategoryIds;
    }

    public void setRelationCategoryIds(String relationCategoryIds) {
        this.relationCategoryIds = relationCategoryIds;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Article{" +
        ", id=" + id +
        ", title=" + title +
        ", txtUrl=" + txtUrl +
        ", collections=" + collections +
        ", comments=" + comments +
        ", praise=" + praise +
        ", count=" + count +
        ", parentCategoryId=" + parentCategoryId +
        ", parentCategoryName=" + parentCategoryName +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        ", isTopping=" + isTopping +
        ", isOriginal=" + isOriginal +
        ", image=" + image +
        ", relationCategoryIds=" + relationCategoryIds +
        "}";
    }
}
